package com.zengqingfa.shardingjdbc.demo.sharding;

import org.apache.shardingsphere.api.sharding.hint.HintShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.hint.HintShardingValue;

import java.util.ArrayList;
import java.util.Collection;

public class BillTableHintShardingAlgorithm implements HintShardingAlgorithm<String> {

    @Override
    public Collection<String> doSharding(Collection<String> tableNames, HintShardingValue<String> hintShardingValue) {

        Collection<String> result = new ArrayList<>();
        for (String tableName : tableNames) {
        	//System.out.println(" available table name : "+ tableName);
            for (String shardingValue : hintShardingValue.getValues()) {
            	//System.out.println(" shardingValue : "+ shardingValue);
            }
        }
        return result;
    }
}